<?php
class TbfLog {
    static function debug($obj){
        self::log('debug',func_get_args() );
    }
    static function log($logName,$obj){
        $s = json_encode(array('_time'=>date('Y-m-d H:i:s'),'obj'=>$obj),JSON_UNESCAPED_UNICODE)."\n";
        @mkdir(TbfConfig::$LogPath);
        file_put_contents(TbfConfig::$LogPath.'/'.$logName.'.log',$s,FILE_APPEND);
    }
}